package com.ww.learn.funs

fun main() {
    val stringPlus: (String, String) -> String = String::plus
    val intPlus: Int.(Int) -> Int = Int::plus

//    Hello, World!
//    Hello, World!
    println(stringPlus.invoke("Hello, ", "World!"))
    println(stringPlus("Hello, ", "World!"))

//    2
//    2
//    2
    println(intPlus.invoke(1, 1))
    println(intPlus(1, 1))
    println(1.intPlus(1)) // 类扩展调用
}